package cn.wangxl.group.rpc.rpcEntity;

import lombok.Data;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @Deacription RpcRequest
 * @Author 20112128
 * @Date 2020/9/18 9:50
 **/
@Data
public class RpcRequest implements Serializable {
    private String serviceName;

    private String method;

    private Map<String,String> header = new HashMap<String, String>(16);

    private Class[] parameterTypes = new Class[20];

    private Object[] parameters = new Object[20];

    public String getHeader(String name){
        if(header == null || !header.containsKey(name)){
            return null;
        }

        return header.get(name);
    }
}
